package com.douya.pangu.application.sys.mapper;

import com.douya.pangu.application.sys.pojo.entity.db.CoreRoleDO;
import com.github.yulichang.base.MPJBaseMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * 说明：后台：角色信息Mapper
 *
 * @author hcy
 * @date 2023/03/24
 */
@Mapper
public interface CoreRoleMapper extends MPJBaseMapper<CoreRoleDO>, BaseMapper<CoreRoleDO>{

    /**
     * 查询角色下的权限
     *
     * @param id 角色id
     * @return 角色下的权限
     */
    @Select("SELECT * FROM core_role WHERE id = #{id}")
    CoreRoleDO selectByRoleId(Long id);
}